{% load djips_extras %}
{% load i18n %}

<h2>{% trans "Image metadata" %}</h2>

<form id="image_properties_form"
      action="{{admin_base_url}}/djips_common/ajax/save_image_properties/{{image.id}}/"
      method="post">
<label>{% trans "Category:" %}</label>
 {{image.color_flag|djips_color_chooser}}<br />
<label>{% trans "Mark:" %}</label>
 {{image.mark|djips_mark_chooser}}<br />
<label>{% trans "Tags:" %}</label>
<textarea name="tags">{{image.tags_as_list}}</textarea>

<h2>{% trans "Image description" %}</h2>
{% for lang in langs %}
<h3 class="accordion_head"
    id="accordion_head_{{lang.id}}">{{lang.name}}</h3>
<div class="accordion_body {% if lang.default %}acc_current{% endif %}"
     id="accordion_body_{{lang.id}}">

  <label for="title_{{lang.id}}">{% trans "Title" %}</label>
  <input type="text"
         id="title_{{lang.id}}"
         name="title_{{lang.id}}"
         value="{{titles|djips_dynamic_key:lang.id}}" /><br />

  <label for="desc_{{lang.id}}">{% trans "Description" %}</label>
  <textarea id="desc_{{lang.id}}"
            name="desc_{{lang.id}}">{{descriptions|djips_dynamic_key:lang.id}}</textarea>
</div>
{% endfor %}

<div class="center">
  <input type="submit"
         rel="{{image.id}}"
         class="valid"
         name="save"
         value="{% trans "Save" %}" />
  <input type="submit"
         class="cancel"
         name="cancel"
         value="{% trans "Cancel" %}"/>
</div>
</form>  
